Flash memory has erase blocks that can be erased and/or written to. Erase blocks from different manufacturers, technologies, generations of technology, versions, and numbers of bits per cell (e.g., single level cell, multilevel cell, quad level cell, etc.) have various erase block sizes. In a storage device or storage system with homogeneous erase block sizes, layout of a RAID stripe or other memory organization, and efficient use of erase blocks is straightforward and a given. However, use of heterogeneous erase block sizes in a storage device or storage system poses problems. It is likely that sizes of heterogeneous blocks are not common divisors of each other in many cases. If such devices with different block sizes are mixed in a single RAID stripe, smaller blocks are filled while there is still space available in larger blocks, and this causes a storage array or storage cluster to waste available memory space. Therefore, there is a need in the art for a solution which overcomes the drawbacks described above.